unit gui_form_tiatai_AISettings;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,  ExtCtrls,
  SystemManager, basicio_player;

type

  { TTiatai_AISettings }

  TTiatai_AISettings = class(TForm)
    AIPlayerSel: TRadioGroup;
    procedure AIPlayerSelSelectionChanged(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  Tiatai_AISettings: TTiatai_AISettings;

implementation

{$R *.lfm}

{ TTiatai_AISettings }

procedure TTiatai_AISettings.AIPlayerSelSelectionChanged(Sender: TObject);
begin
  case AIPlayerSel.ItemIndex of
    0: GlobalSystemManager.AI.AIPlayerID := GlobalSystemManager.IO.Data.GetPlayerIDByColor(PC_White);
    1: GlobalSystemManager.AI.AIPlayerID := GlobalSystemManager.IO.Data.GetPlayerIDByColor(PC_Yellow);
    2: GlobalSystemManager.AI.AIPlayerID := GlobalSystemManager.IO.Data.GetPlayerIDByColor(PC_Blue);
    3: GlobalSystemManager.AI.AIPlayerID := GlobalSystemManager.IO.Data.GetPlayerIDByColor(PC_Red);
  end;
end;

end.

